package com.dbms.controller;

import com.dbms.common.annotation.ResponseResult;
import com.dbms.domain.vo.FloodmapSiteVO;
import com.dbms.service.FloodmapSiteService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Tag(name = "河流管理", description = "河流管理相关接口")
@RestController
@RequestMapping("/floodmapSite")
@RequiredArgsConstructor
public class FloodmapSiteController {

    final FloodmapSiteService floodmapSiteService;

    @Operation(summary = "获取河流列表", description = "获取河流列表")
    @GetMapping("/getAllList")
    public ResponseResult<List<FloodmapSiteVO>> getAllList(){
        return ResponseResult.success(floodmapSiteService.getAllList());
    }
}
